import axios from "../index.js";
// 列表
export const teamListPage = (data) => {
  return axios.request({
    url: "/resource/baseResourceTeam/listPage",
    method: "post",
    data: data
  });
};
// 队伍按专业统计
export const statisticsTeamByteamMajor = () => {
  return axios.request({
    url: "/resource/baseResourceTeam/statisticsTeamByteamMajor",
    method: "post"
  });
};

export const vehicleListPage = (data) => {
  return axios.request({
    url: "/resource/baseResourceVehicle/listPage",
    method: "post",
    data: data
  });
};
export const equipListPage = (data) => {
  return axios.request({
    url: "/resource/baseResourceEquip/listPage",
    method: "post",
    data: data
  });
};
export const suppliesListPage = (data) => {
  return axios.request({
    url: "/resource/baseResourceSupplies/listPage",
    method: "post",
    data: data
  });
};
export const memberListPage = (data) => {
  return axios.request({
    url: "/resource/baseResourceMember/listPage",
    method: "post",
    data: data
  });
};
// 队伍台账下拉
export const listTeamType = (data) => {
  return axios.request({
    url: "/resource/baseResourceTeam/listTeamType",
    method: "get",
    data: data
  });
};

// 车辆台账下拉
export const listVehicleProperties = (data) => {
  return axios.request({
    url: "/resource/baseResourceVehicle/listVehicleProperties",
    method: "get",
    data: data
  });
};
// 装备台账下拉
export const listEquipParam = (data) => {
  return axios.request({
    url: "/resource/baseResourceEquip/listEquipParam",
    method: "get",
    data: data
  });
};
// 资源首页 储备人员数据
export const resourceSYStatistics = (data) => {
  return axios.request({
    url: "/resource/baseResourceReserve/resourceSYStatistics",
    method: "post",
    data: data
  });
};
// 物资台账下拉
export const listSuppliesParam = (data) => {
  return axios.request({
    url: "/resource/baseResourceSupplies/listSuppliesParam",
    method: "get",
    data: data
  });
};
// 人员台账下拉
export const MemberselectQueryParam = (data) => {
  return axios.request({
    url: "/resource/baseResourceMember/selectQueryParam",
    method: "get",
    data: data
  });
};
// 人员台账 模板下载
export const personnelLedgerDownload = (data) => {
  return axios.request({
    url: "/resource/excelTemplateDown/downMember",
    method: "get",
    data: data,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    responseType: "blob"
  });
};
// 队伍台账 模板下载
export const ranksLedgerDownload = (data) => {
  return axios.request({
    url: "/resource/excelTemplateDown/downTeam",
    method: "get",
    data: data,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    responseType: "blob"
  });
};
// 人员台账 导出
export const personnelLedgerExcelExport = (data) => {
  return axios.request({
    url: `/resource/baseResourceMember/exportByIds?ids=${data}`,
    method: "get",
    data: data,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    responseType: "blob"
  });
};
// 人员台账 删除
export const personnelDeleteByIds = (data) => {
  return axios.request({
    url: "/resource/baseResourceMember/deleteByIds",
    method: "post",
    data: data
  });
};
// 人员台账 导入
export const personnelImport = (data) => {
  return axios.request({
    url: "/resource/memberImportExcel/doImportMemberExcel",
    method: "post",
    data: data,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    responseType: "blob"
  });
};
// 队伍台账 新增保存
export const ranksLedgerSave = (data) => {
  return axios.request({
    url: "/resource/baseResourceTeam/save",
    method: "post",
    data: data
  });
};
// 人员台账 新增保存
export const personnelSave = (data) => {
  return axios.request({
    url: "/resource/baseResourceMember/save",
    method: "post",
    data: data
  });
};
// 人员台账 详情
export const personnelDetailsByIds = (data) => {
  return axios.request({
    url: "/resource/baseResourceMember/detailsById",
    method: "get",
    data: data
  });
};
// 人员台账 修改
export const personnelUpdateById = (data) => {
  return axios.request({
    url: "/resource/baseResourceMember/updateById",
    method: "post",
    data: data
  });
};
// 队伍台账 删除
export const ranksDeleteByIds = (data) => {
  return axios.request({
    url: "/resource/baseResourceTeam/deleteByIds",
    method: "post",
    data: data
  });
};
// 队伍台账 导出
export const ranksExportByIds = (data) => {
  return axios.request({
    // url: "/resource/baseResourceTeam/exportByIds",
    url: `/resource/baseResourceTeam/exportByIds?ids=${data}`,
    method: "get",
    data: data,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    responseType: "blob"
  });
};
// 队伍台账 详情
export const ranksLedgerDetailsByIds = (data) => {
  return axios.request({
    url: "/resource/baseResourceTeam/detailsById",
    method: "get",
    data: data
  });
};
// 队伍台账 修改
export const ranksUpdateById = (data) => {
  return axios.request({
    url: "/resource/baseResourceTeam/updateById",
    method: "post",
    data: data
  });
};
// 队长名称 接口
export const queueLengthName = (data) => {
  return axios.request({
    url: "/resource/baseResourceMember/listMember",
    method: "post",
    data: data
  });
};
// 队伍台账 导入
export const ranksDoImportTeamExcel = (data) => {
  return axios.request({
    url: "/resource/teamImportExcel/doImportTeamExcel",
    method: "post",
    data: data,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    responseType: "blob"
  });
};
// export const getDicListlargeCategoryList = (data) => {
//   return axios.request({
//     url: `/system/dic/getDicList?code=${data}`,
//     method: "post",
//     data: data
//   });
// };
export const getDicListlargeCategoryList = (data) => {
  return axios.request({
    url: "/system/dic/getDicList",
    method: "get",
    data: data
  });
};



// 首页柱状图队伍统计
export const getResourceTeamData = (data) => {
  return axios.request({
    url: "/resource/baseResourceTeam/resourceTeam",
    method: "get",
    data: data
  });
};
// 首页柱状图车辆统计
export const getResourceVehicleData = (data) => {
  return axios.request({
    url: "/resource/baseResourceVehicle/resourceVehicle",
    method: "get",
    data: data
  });
};
// 首页装备统计
export const getResourceEquipmentData = (data) => {
  return axios.request({
    url: "/resource/baseResourceEquip/resourceEquipment",
    method: "get",
    data: data
  });
};
// 首页物资统计
export const getResourceMaterialsData = (data) => {
  return axios.request({
    url: "/resource/baseResourceSupplies/resourceMaterials",
    method: "get",
    data: data
  });
};
// 调配资源统计
export const getResourceDetails = (data) => {
  return axios.request({
    url: "/resource/baseResourceTeam/resourceDetails",
    method: "post",
    data: data
  });
};
